<?php

$letras = array('a', 'c', 'f', 'j', 'i', 'e', 'k', 'h', 'q', 'n');

foreach ($letras as $value) {
    if (($value != 'a')  && ($value != 'e') && ($value != 'i') && ($value != 'o') && ($value != 'u')) {
        $consoantes[]= $value." ";
    }
}
foreach ($consoantes as $value) {
    echo "$value ";
}
?>
